﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Profile.Master" Inherits="System.Web.Mvc.ViewPage"  %>


<asp:Content ID="_title" ContentPlaceHolderID="page_title" runat="server">
    <%=Html.Encode(ViewData["title"]) %>
</asp:Content>

<asp:Content ID="_js" ContentPlaceHolderID="_javascript" runat="server">
   
    <script type="text/javascript">
        var friend_id = <%=ViewData["friend_id"] %>;
        var mem_id = <%=ViewData["mem_id"] %>;
    </script>
</asp:Content>
<asp:Content ID="_right" runat="server" ContentPlaceHolderID="colRight">
<%Blog.BAL.countries con = new Blog.BAL.countries(); Blog.BAL.cities c = new Blog.BAL.cities(); Blog.BAL.job j = new Blog.BAL.job(); %>

    <div id="content_wide">
        
    	<div class="show_content">
    		<div class="title"><div>Content</div></div>
            <div class="border_box" style="background:#fff">
                <div class="title_username"><%=ViewData["username"]%></div>
                <div id="right">
                    <div align="center">
                        <div id="editavarta" style="display:none; position:absolute;padding:2px;border:1px solid #e3e3e3;background:#fff" align="right"><%=Html.ActionLink("Sửa avarta","","Avarta") %></div>
                        <% if (ViewData["avarta"] == "0")
                           { %>
                            <img src="../../Content/images/novatar.gif" id="avarta" alt="Avarta"/>
                        <% }
                           else
                           { %>
                           <img src='../../Content/<%=ViewData["avarta"] %>' id="avarta" width="180" />
                            <%} %>
                    </div>
                    <div class="title_top" align ="center"><b>Lượt xem</b></div>
                    <div class="title_ct"></div>
                    <div class="title_bg" align ="center">Số lần xem<br /><b>0</b></div>
                    <div class="title_bottom"></div>
                    <div><%=Html.ActionLink("Thông tin cá nhân", "profileinfo", "Profile", new { }, new { @class = "usser_info" })%></div>
                     <%
                         List<Blog.DAL.sp_get_member_by_idResult> user = (List<Blog.DAL.sp_get_member_by_idResult>)ViewData["basic_info"];
                                if (user.Count() > 0)
                                {
                         %>
                    <div class="border_1">
                        <div class="title" style="float:left;width:158px">
                            Thông tin cá nhân
                        </div>
                        <%
                         if (ViewData["check"].ToString() == "1")
                         {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"><a href='' class="bt_edit"></a></div>
                        <%}
                         else
                         {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"></div>
                        <%
                         } %>
                        <div class="clear"></div>
                        <div>
                            <li>
                                Giới tính:<br /><span><%=Html.Encode(user[0].gender)%></span>
                            </li>
                            <li>
                                Ngày sinh:<br /><span><%=user[0].dayJoin %> Tháng <%=user[0].monthJoin %> Năm <%=user[0].yearJoin %> </span>
                            </li>
                            <li>
                                Tỉnh thành:<br /><span><%=Html.Encode(c.get_city_by_id(int.Parse(user[0].country.ToString()), int.Parse(user[0].city.ToString())))%></span>
                            </li>
                        </div>
                    </div>
                    <%} %>
                    <%
                        List<Blog.DAL.sp_get_mem_contact_by_idResult> contact = (List<Blog.DAL.sp_get_mem_contact_by_idResult>)ViewData["contact_info"];
                        if (contact.Count() > 0)
                        {
                    %>
                    <div class="border_1">
                        <div class="title" style="float:left;width:158px">
                            Thông tin liên lạc
                        </div>
                        <%
                        if (ViewData["check"].ToString() == "1")
                        {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"><a href='' class="bt_edit"></a></div>
                        <%}
                        else
                        {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"></div>
                        <%
                        } %><div class="clear"></div>
                        <div>
                                
                            <li>
                                Yahoo ID:<br /><span><%=Html.Encode(contact[0].yahoo_id)%></span>
                            </li>
                            <li>
                                Gmail ID:<br /><span><%=Html.Encode(contact[0].gmail_id)%></span>
                            </li>
                            <li>
                                Skype ID:<br /><span><%=Html.Encode(contact[0].skype_id)%></span>
                            </li>
                        </div>
                    </div>
                    <%} %>
                    
                    <%
                        List<Blog.DAL.sp_get_school_by_idResult> school = (List<Blog.DAL.sp_get_school_by_idResult>)ViewData["school_info"];
                        if (school.Count() > 0)
                        {
                    %>
                    <div class="border_1">
                        <div class="title" style="float:left;width:158px">
                            Thông tin học vấn
                        </div>
                        <%
                        if (ViewData["check"].ToString() == "1")
                        {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"><a href='' class="bt_edit"></a></div>
                        <%}
                        else
                        {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"></div>
                        <%
                        } %><div class="clear"></div>
                        <div>
                                
                            <li>
                                Trường:<br /><span><%=Html.Encode(school[0].school_name)%></span>
                            </li>
                            <li>
                                Tỉnh thành:<br /><span><%=Html.Encode(c.get_city_by_id(int.Parse(school[0].country.ToString()), int.Parse(school[0].city.ToString())))%></span>
                            </li>
                            <li>
                                Niên khóa:<br /><span>
                                <%
                        if (school[0].year_start == DateTime.Now.Year)
                            Response.Write(Html.Encode(school[0].year_start) + " đến nay ");
                        else
                            Response.Write("Từ năm " + Html.Encode(school[0].year_start) + " đến " + Html.Encode(school[0].year_end));
                                %>
                                                </span>
                            </li>
                            
                        </div>
                    </div>
                      <%}
                        List<Blog.DAL.sp_get_job_by_idResult> job = (List<Blog.DAL.sp_get_job_by_idResult>)ViewData["job_info"];
                        if (job.Count() > 0)
                        {
                      %>
                    <div class="border_1">
                        <div class="title" style="float:left;width:158px">
                            Thông tin nghề nghiệp
                        </div>
                        <%
                          if (ViewData["check"].ToString() == "1")
                          {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"><a href='' class="bt_edit"></a></div>
                        <%}
                          else
                          {    
                        %>
                        <div style="float:right;width:20px;height:29px;background:#f1f3f7"></div>
                        <%
                          } %><div class="clear"></div>
                        <div>
                                                         
                            <li>
                                Tên công ty:<br /><span><%=Html.Encode(job[0].company)%></span>
                            </li>
                            <li>
                                Tỉnh thành:<br /><span><%=Html.Encode(c.get_city_by_id(int.Parse(job[0].country.ToString()), int.Parse(job[0].city.ToString())))%></span>
                            </li>
                            <li>
                                Nghề nghiệp:<br /><span><%=Html.Encode(j.get_job_by_id(int.Parse(job[0].job_name.ToString())))%></span>
                            </li>
                            <li>
                                Chức vụ:<br /><span><%=Html.Encode(job[0].task)%></span>
                            </li>
                        </div>
                    </div>
                    <%} %>
                </div>
                <div id="walls" style="margin-left:5px">
                    <div id="show_content">
                        <div class="border_1">
                            <form method="post">
                                <textarea id="wal" class="ckeditor" name="content"></textarea><input type="button" id="addwall" value="Chia sẽ" />
                            </form>
                        </div>
                        <div class="border_1" style="padding:5px">
                            <div><b>Tường nhà</b></div>
                            <div id="homewall"></div>
                        </div>
                    </div>
                </div>
                <div class="clear"></div>
             </div>
        </div>
    </div>
    
    <div class="clear"></div>
   <div class="space"></div>
</div>
</asp:Content>
